<?
$query = "select * from themes";
$result = mysql_query($query);
if ( !$result )
{
	echo ( "<P>Error doing a select: " . mysql_error() . "</P>" );
}
else
{
	
$rr=mysql_num_rows($result); //this is calculating the number of rows read from database and puts it into variable rr
	// set up form
echo '<form name="project_info_form?project_id='.$project_id.'" id="infoProject" method="post" action="ed03.php">';
echo 'Title: <input type="text" name="title" size="100" value="'.$project_title.'"/><br />
		<br />';
echo 'Choose a theme: ';
//echo 'project_css '.$project_css;
for ($i=0; $i<$rr;$i++)  {
	$nextresult = mysql_fetch_array($result);
	if ($nextresult['name']==$project_css) {
		$checked = 'checked';
	} else {
		$checked = ' ';
	}
	echo '<input type="radio" name="theme" value="'.$nextresult['name'].'" '.$checked.' /> '.$nextresult['name']; 
	} //for	
	echo '<input type="submit" value="Save Details" />';
	echo '<input type="hidden" name="project_id" value="'.$project_id.'" />';
	echo '<input type="hidden" name="project_info_form_submit_check" value="1" />';
} //top else
?>